var TSUI;
(function (TSUI) {
    (function (Animation) {
        var ExpandableAnimator = (function () {
            function ExpandableAnimator() {
            }
            ExpandableAnimator.prototype.Show = function (control, callback) {
                if (typeof callback === "undefined") { callback = null; }
                var height = control.ContentPanel.Top().Value + control.ContentPanel.Height().Value + 20;

                control.AnimationElement().stop(true, false);
                control.AnimationElement().animate({
                    height: height
                }, ExpandableAnimator.AnimationTime, ExpandableAnimator.AnimationEasing, function () {
                    if (callback !== null) {
                        callback();
                    }
                });
            };

            ExpandableAnimator.prototype.Hide = function (control, callback) {
                if (typeof callback === "undefined") { callback = null; }
                control.AnimationElement().animate({
                    height: control.MainTitleBar.ActualHeight()
                }, ExpandableAnimator.AnimationTime, ExpandableAnimator.AnimationEasing, function () {
                    if (callback !== null) {
                        callback();
                    }
                });
            };
            ExpandableAnimator.AnimationTime = 450;

            ExpandableAnimator.AnimationEasing = "easeOutQuad";
            return ExpandableAnimator;
        })();
        Animation.ExpandableAnimator = ExpandableAnimator;
    })(TSUI.Animation || (TSUI.Animation = {}));
    var Animation = TSUI.Animation;
})(TSUI || (TSUI = {}));
